objects :=  hello.o main.o

main: $(objects)
	gcc -o main $(objects) 
	./main

hello.o: hello.c hello.h
	@gcc -c hello.c -o hello.o
	echo abc

main.o: main.c hello.h
	@gcc -c main.c -o main.o

# 利用make的自动推导
.PHONY: clean all



clean: 
	rm -rf *.o 
	rm -rf main

all: $(objects)
	@-gcc -o main $(objects) 
	@./main
	@rm -rf *.o 
	@rm -rf main
